package cn.tedu.hospital.physicans.controller;

import cn.tedu.hospital.base.response.JsonResult;
import cn.tedu.hospital.physicans.pojo.dto.LoginParam;
import cn.tedu.hospital.physicans.pojo.vo.LoginVO;
import cn.tedu.hospital.physicans.service.PhysicansService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
@RequestMapping("/v1/physicians/")
public class PhysicansController {
    @Autowired
    private PhysicansService physicansService;
    @PostMapping("login")
    public JsonResult login (LoginParam loginParam){
        log.debug("开始处理登录业务:{}",loginParam);
        LoginVO loginVO =physicansService.login(loginParam);
        return JsonResult.ok(loginVO);
    }
}
